<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="/js/vue.js"></script>
    <title>v-for循环指令</title>
</head>
<body>
    <div id ="app">
       <ul>
        <li v-for="(book,index) in books">{{index}}-{{books.title}}</li>
       </ul>
    </div>
</body>    
<script>   
    var vm =new Vue({
        el:"#app",
        data:{
        books:[{title:"vue 无难事"},
        {title:"vc++深入详解"},
        {title:"servlet/jsp 深入详解"}
    ]

            
         }
         
       })
</script>     
    
</html>